﻿@model IDictionary<string, object>
@{
    ViewBag.Title = "所有商品分类";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Styles
{
    <link href="../../Content/themes/default/types.css" rel="stylesheet" type="text/css" />
}
<div class="main pageWidth">
    <div id="content">
        <div class="tmallClassList module" id="J_TMallClassList">
            <ul class="navList" id="J_NavList">
                @foreach (var item in (List<Enter.Mvc.Mall.Model.Category.CategoryModel>)Model["allCate"])
                {

                    if (item.Selected)
                    {
                    <li class="active"><a href="iwanttobuy?parentId=@item.CNO">@item.CName</a></li>
                    }
                    else
                    {
                    <li><a href="iwanttobuy?parentId=@item.CNO">@item.CName</a></li>
                    }
                }
            </ul>
            <div class="classList" id="J_ClassList">
                <div class="j_classList">
                    @if (Model["key"] == "0")
                    {
                        <div class="oldCategory clearfix">
                            @foreach (var item in (List<Enter.Mvc.Mall.Model.Category.CategoryModels>)Model["SecondCateList"])
                            {
                                var i = 0;
                                <div class="oldCategoryList j_oldCategoryList">
                                    <div class="oldCategoryBox">
                                        <h2>
                                            <a href="#">@item.cate.CName</a></h2>
                                        <div class="oldCategoryContent">
                                            <a title="@item.cate.CName" href="/Product/search_product?nav=spu_cat&cat=@item.cate.CNO" class="icon">
                                                <img src="@item.cate.CName" /></a>
                                            <div class="oldCategoryKeyword">
                                                <div class="oldKeyword">
                                                    @for (i = 0; i < item.MinCateList.Count; i++)
                                                    {
                                                        var good = item.MinCateList[i];
                                                        if (i < 7)
                                                        {
                                                        <a href="/Product/search_product?nav=spu_cat&cat=@good.CNO">@good.CName</a>
                                               
                                                        }
                                                        else
                                                        {
                                                            break;
                                                        }

                                                    }
                                                </div>
                                                @if (item.MinCateList.Count > 7)
                                                {
                                                    <div class="oldHoverKeyword">
                                                        @for (i = 7; i < item.MinCateList.Count; i++)
                                                        {
                                                            var good = item.MinCateList[i];
                                                            <a href="/Product/search_product?nav=spu_cat&cat=@good.CNO">@good.CName</a>
                                                        }
                                                    </div>
                                                }
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            }
                        </div>
                    }
                    else
                    {
                        foreach (var item in (List<Enter.Mvc.Mall.Model.Category.CategoryModels>)Model["SecondCateList"])
                        {
                           
                                       
                        <div class="subCategory">
                            <h2>
                                <a href="/Product/search_product?nav=spu_cat&cat=@item.cate.CNO">@item.cate.CName</a></h2>
                            <div class="subCategoryContent">
                                <ul class="clearfix subCategoryList">
                                    @foreach (var good in item.MinCateList)
                                    { 
                                        <li class="first"><a href="/Product/search_product?nav=spu_cat&cat=@good.CNO">
                                            <img alt="" width="80" height="80" src="@Enter.Config.ImgPathConfig.GoodClassServerPath@good.Icon"><span>@good.CName</span></a>
                                        </li>
                                    }
                                </ul>
                            </div>
                        </div>
                        }
                    }
                </div>
            </div>
        </div>
    </div>
</div>
